<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const xhr = new XMLHttpRequest();
      xhr.open("POST", "http://127.0.0.1:8081/up");
      // xhr.setRequestHeader("Content-Type", "multipart/form-data");
      xhr.onload = function () {
        console.log(xhr.response);
      };
      // fd = {name:'jack',age:20}
      const fd = new FormData();
      fd.append("name", "jack");
      fd.append("age", 20);
      xhr.send(fd);
    </script>
  </body>
</html>
